import { createRouter, createWebHistory } from 'vue-router'
import { setRoutes } from './setRoutes.ts'

import type { RouteList } from '@/types/router/index.ts'

const routes: RouteList = [
  {
    path: '/',
    redirect: '/index',
  },
]
setRoutes(routes)

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})

export default router
